$--modal-background-color: #fff;
$--border-radius-small: 2px;
$--modal-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
$--modal-padding-primary: 10px;
$--message-close-size: 16px;
$--color-info: #909399;
$--color-primary: #409eff;
$--modal-font-line-height: 22px;
$--modal-title-font-size: 14px;
$--color-text-primary: rgba(0, 0, 0, 0.85);
$--color-text-regular: #606266;
$--modal-content-font-size: 14px;

$--modal-header-background-color: #fff;

@include b(Modal) {
  position: relative;
  margin: 0 auto 50px;
  background: $--modal-background-color;
  border-radius: $--border-radius-small;
  box-shadow: $--modal-box-shadow;
  box-sizing: border-box;
  width: 50%;

  @include when(fullscreen) {
    width: 100%;
    margin-top: 0;
    margin-bottom: 0;
    height: 100%;
    overflow: auto;
  }

  @include e(wrapper) {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: auto;
    margin: 0;
  }

  @include e(header) {
    // padding: $--modal-padding-primary;
    padding: 16px 24px;
    background: $--modal-header-background-color;
  }

  @include e(headerbtn) {
    position: absolute;
    top: $--modal-padding-primary;
    right: $--modal-padding-primary;
    padding: 0;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    font-size: $--message-close-size;

    .el-dialog__close {
      color: $--color-info;
    }

    &:focus,
    &:hover {
      .el-dialog__close {
        color: $--color-primary;
      }
    }
  }

  @include e(title) {
    line-height: $--modal-font-line-height;
    font-size: $--modal-title-font-size;
    color: $--color-text-primary;
    font-weight: 500;
  }

  @include e(body) {
    padding: ($--modal-padding-primary + 10px);
    color: $--color-text-regular;
    font-size: $--modal-content-font-size;
    word-break: break-all;
  }

  @include e(footer) {
    padding: $--modal-padding-primary;
    text-align: right;
    box-sizing: border-box;
    text-align: center;
    padding-top: 0;
    >.el-button {
      
    }
  }

  // 内容居中布局
  @include m(center) {
    text-align: center;

    @include e(body) {
      text-align: initial;
      padding: 25px ($--modal-padding-primary + 5px) 30px;
    }

    @include e(footer) {
      text-align: inherit;
    }
  }
}

.dialog-fade-enter-active {
  animation: dialog-fade-in 0.3s;
}

.dialog-fade-leave-active {
  animation: dialog-fade-out 0.3s;
}

@keyframes dialog-fade-in {
  0% {
    transform: translate3d(0, -20px, 0);
    opacity: 0;
  }
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@keyframes dialog-fade-out {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, -20px, 0);
    opacity: 0;
  }
}



// transfered dom 
.transfered-modal {
  position: absolute !important;
  >.v-Modal {
    position: absolute;
    overflow: hidden;
    top: 1px;
    right: 0;
    bottom: 0;
    margin: 0;
    left: 0;
    width: 100% !important;
    margin-top: 42px !important;

    >.v-Modal__body {
      margin: 0;
      padding: 0;
      height: calc(100% - 43px);
      overflow: auto;
    }
  }
}